﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Jayrock.Json;
using BLL;

namespace SilkRoute.Class
{
    public partial class insertProfile : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string destination = Request["destination"].ToString();
            string name = Request["name"].ToString();
            string email = Request["email"].ToString();

            ProfileManager manager = new ProfileManager();
            int result = manager.InsertProfile(destination, name, email);

            JsonObject jObj = new JsonObject();
            if (result > 0)
            {
                jObj["result"] = result;
            }
            else
            {
                jObj["result"] = "0";
            }

            Response.Write(jObj);
        }
    }
}